#include <string.h>
#include "myString.h"

myString::myString(const char *s)
{
    if(s == NULL)
    {
        _str = new char[1];
        *_str = '\0';
    }
    else
    {
     int len = strlen(s);
     _str = new char[len + 1];
     strcpy(_str,s);

    }
}

char * myString::c_str()
{
    return _str;
}


myString::~myString()
{
    delete []_str;
}
